package model.userhandler;

import java.io.Serializable;
import java.util.Calendar;

/**
 * A class that represents a user in the application
 * @author Tobias Møller Kjærsgaard
 * @author Hjalte Blichfeldt Flyger
 * @author Gitte Simonsen
 * @author Claus Lund
 */
public class User implements Serializable {
    private String userName;
    private String password;
    private String firstName;
    private String lastName;
    private Calendar birthday;
    private final InformationManager iManager;

    public User(String userName, String password, String firstName, String lastName, InformationManager iManager) {
        this.userName = userName;
        this.password = password;
        this.firstName = firstName;
        this.lastName = lastName;
        this.iManager = iManager;
    }

    public Calendar getBirthday() {
        return birthday;
    }

    public void setBirthday(int year, int month, int date) {
        this.birthday = Calendar.getInstance();
        this.birthday.set(year, month, date);
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public InformationManager getIManager() {
        return iManager;
    }

    @Override
    public String toString() {
        return firstName + " " + lastName;
    }



}
